package com.eight.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 郭坤
 * @since 2023-02-24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="sysLogininfor", description="登录实体类")
@TableName(value = "sys_loginlog")
@Accessors(chain = true)
public class SysLogininfor implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "访问ID")
    @TableId(value = "info_id", type = IdType.AUTO)
    @TableField(value = "info_id")
    private Integer infoId;

    @ApiModelProperty(value = "登录账号")
    @TableField(value = "login_name")
    private String loginName;

    @ApiModelProperty(value = "登录IP地址")
    @TableField(value = "ipaddr")
    private String ipaddr;

    @ApiModelProperty(value = "浏览器类型")
    @TableField(value = "browser")
    private String browser;

    @ApiModelProperty(value = "登录状态（0失败 1成功）")
    @TableField(value = "statu")
    private Integer statu;

    @ApiModelProperty(value = "提示消息")
    @TableField(value = "msg")
    private String msg;

    @ApiModelProperty(value = "访问时间")
    @TableField(value = "login_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime loginTime;


}
